<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 2.声明要被vue所控制的DOM区域 -->
    <div id="app">
      <div class="hearder">{{title}}</div>
    </div>
    <!-- 1.导入脚本文件 -->
    <script src="lib/vue-2.6.12.js"></script>
    <!-- 3.创建vue的实例 -->
    <script>
      const vm = new Vue({
        el: '#app',
        data: {
          title: 'MyHeader组件',
        },
      })
    </script>
    <style lang="less">
      .hearder {
        margin: 0 auto;
        display: fixed;
        height: 50px;
        width: 500px;
        background-color: #1b7af6;
        text-align: center;
        line-height: 50px;
        color: #fff;
      }
    </style>
  </body>
</html>
